package com.yinhe.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yinhe.system.mapper.SysApplicationsRolesMapper;
import com.yinhe.system.domain.SysApplicationsRoles;
import com.yinhe.system.service.ISysApplicationsRolesService;

/**
 * 角色应用关联Service业务层处理
 * 
 * @author yinhe
 * @date 2022-07-21
 */
@Service
public class SysApplicationsRolesServiceImpl implements ISysApplicationsRolesService 
{
    @Autowired
    private SysApplicationsRolesMapper sysApplicationsRolesMapper;

    /**
     * 查询角色应用关联
     * 
     * @param roleId 角色应用关联主键
     * @return 角色应用关联
     */
    @Override
    public SysApplicationsRoles selectSysApplicationsRolesByRoleId(Long roleId)
    {
        return sysApplicationsRolesMapper.selectSysApplicationsRolesByRoleId(roleId);
    }

    /**
     * 查询角色应用关联列表
     * 
     * @param sysApplicationsRoles 角色应用关联
     * @return 角色应用关联
     */
    @Override
    public List<SysApplicationsRoles> selectSysApplicationsRolesList(SysApplicationsRoles sysApplicationsRoles)
    {
        return sysApplicationsRolesMapper.selectSysApplicationsRolesList(sysApplicationsRoles);
    }

    /**
     * 新增角色应用关联
     * 
     * @param sysApplicationsRoles 角色应用关联
     * @return 结果
     */
    @Override
    public int insertSysApplicationsRoles(SysApplicationsRoles sysApplicationsRoles)
    {
        return sysApplicationsRolesMapper.insertSysApplicationsRoles(sysApplicationsRoles);
    }

    /**
     * 修改角色应用关联
     * 
     * @param sysApplicationsRoles 角色应用关联
     * @return 结果
     */
    @Override
    public int updateSysApplicationsRoles(SysApplicationsRoles sysApplicationsRoles)
    {
        return sysApplicationsRolesMapper.updateSysApplicationsRoles(sysApplicationsRoles);
    }

    /**
     * 批量删除角色应用关联
     * 
     * @param roleIds 需要删除的角色应用关联主键
     * @return 结果
     */
    @Override
    public int deleteSysApplicationsRolesByRoleIds(Long[] roleIds)
    {
        return sysApplicationsRolesMapper.deleteSysApplicationsRolesByRoleIds(roleIds);
    }

    /**
     * 删除角色应用关联信息
     * 
     * @param roleId 角色应用关联主键
     * @return 结果
     */
    @Override
    public int deleteSysApplicationsRolesByRoleId(Long roleId)
    {
        return sysApplicationsRolesMapper.deleteSysApplicationsRolesByRoleId(roleId);
    }
}
